#ifndef BTFORM_H
#define BTFORM_H
#include <QWidget>
#include <QPropertyAnimation>

namespace Ui {
class BtForm;
}

class BtForm : public QWidget
{
    Q_OBJECT

public:
    explicit BtForm(QWidget *parent = nullptr);
    ~BtForm();

    void section(QString btIcon, QString btText,int mid);
    int getPageId() const;
    // 清除背景
    void clearBackground();
    // 显示动画效果
    void hideAnimal();
    // 修改 BtForm 类，添加一个方法来设置背景
    void setBackgroundColor();

protected:
    // 鼠标点击事件
    virtual void mousePressEvent(QMouseEvent* event) override;



private:
    void setAnimation();
signals:
    void btClick(int id);
private:
    Ui::BtForm *ui;
    int pageId = 4;
    QPropertyAnimation* line1Animal;
    QPropertyAnimation* line2Animal;
    QPropertyAnimation* line3Animal;
    QPropertyAnimation* line4Animal;
};

#endif // BTFORM_H
